package org.hp.intern.test;
import java.net.*;
import java.io.*;

public class myclient {

	Socket mysocket;
	BufferedReader in;
	PrintWriter out;
	
	public void Client(){
		
		try{
			String address = "localhost";
			mysocket = new Socket(address,8090);
			in = new BufferedReader(new InputStreamReader(mysocket.getInputStream()));
			out = new PrintWriter(mysocket.getOutputStream());
			
			BufferedReader line = new BufferedReader(new InputStreamReader(System.in));
			out.println(line.readLine());
			line.close();
			out.flush();
			in.close();
			mysocket.close();

		}catch(Exception e){
			System.err.println(e.toString());
			
		}
	}
	public static void main(String[] args)throws IOException{
		
		myclient newclient = new myclient();
		newclient.Client();
		
	}
}
